import { createRouter, createWebHistory } from 'vue-router';

const routes = [
    { path: '/login', name: 'login', component: () => import("@/views/Login.vue") },
    {
        path: '/main', name: 'main', component: () => import("@/views/Main/Main.vue"),
        children:
            [
                { path: '/', name: 'desktop', component: () => import("@/views/Desktop/Main.vue") }, 

                { path: '/Demo/Demo', name: 'views-Demo-Demo', component: () => import("@/views/Demo/Demo.vue") },

                { path: '/Desktop/Main', name: 'views-Desktop-Main', component: () => import("@/views/Desktop/Main.vue") },
                { path: '/Desktop/Monitor', name: 'views-Desktop-Monitor', component: () => import("@/views/Desktop/Monitor.vue") },
                { path: '/Desktop/Work', name: 'views-Desktop-Work', component: () => import("@/views/Desktop/Work.vue") }, 

                { path: '/System/User', name: 'views-System-SystemUser', component: () => import("@/views/System/SystemUser.vue") },
                { path: '/System/Role', name: 'views-System-SystemRole', component: () => import("@/views/System/SystemRole.vue") },
                { path: '/System/Menu', name: 'views-System-SystemMenu', component: () => import("@/views/System/SystemMenu.vue") },
                { path: '/System/Dict', name: 'views-System-SystemDict', component: () => import("@/views/System/SystemDict.vue") },
                { path: '/System/City', name: 'views-System-SystemCity', component: () => import("@/views/System/SystemCity.vue") },

                { path: '/User/Account', name: 'views-User-Account', component: () => import("@/views/User/Account.vue") },
                { path: '/User/Password', name: 'views-User-User', component: () => import("@/views/User/Password.vue") },
            ]
    },
];

const router = createRouter({
    routes,
    history: createWebHistory()
})

export default router
